﻿using System;
using Odin.Contracts.Services;
using Odin.Execution;
using Odin.Runners.CommandLine.Resources;

namespace Odin.Runners.CommandLine.Arguments
{
	public class Port : ArgumentHandler
	{
		public override string Name { get { return "Port"; } }
		public override string Description { get { return ArgumentDescriptions.Port; } }
		public override void Execute(string value)
		{
			var configuration = Core.Kernel.Get<IConfiguration>();
			configuration.WebServer.Port = Convert.ToInt32(value);
		}
	}
}
